Security for Web Developers by John Paul Mueller

Security for Web Developers by John Paul Mueller

Author:John Paul Mueller
Language: eng
Format: mobi, epub, pdf
Publisher: O’Reilly Media, Inc.
Published: 2015-10-31T16:00:00+00:00


<body>

<h1>Performing a Range Check</h1>

<input id="Data" type="number" value="0" min=0 max=5 /><br />

<button id="Test" onclick="testValue()">

Test

</button>

</body>

</html>

The basic checks work as before. However, if someone chooses to change the min and max values accepted by the <input> tag, the code automatically responds by changing the conditions of the check. The failure points in this example are fewer.

However, to obtain code that is both secure and reliable, you must play a price in speed. Notice the number of additional lines of code in the second example and the increased number of function calls. You won’t likely notice a difference in the speed of this particular example, but when you start adding these sorts of checks to an entire application, you can see some serious speed degradation. The code is more reliable and secure, but the user may not be happy with the result.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.